var e = {}, o = getApp();

e.pushToAd = function(e, a) {
  console.log('pushToAd e',e)
  console.log('pushToAd a',a)
  var linktype = e.currentTarget.dataset.linktype, n = '', i = e.currentTarget.dataset.linkkey

  if(linktype == "article"){//文章
    n = '/pages/article/index?id='+i
  }
  // else if ("page" === t) { n = "/pages/smallPage/index?id=" + i; } //商品页
  // else if ("product" === t) { n = "/pages/productdetail/index?id=" + i; } //商品详情
  // else if ("bargain" === t) { n = "/pages/bargainDetail/index?id=" + i; } //砍价
  // else if ("group" === t) { n = "/pages/productdetail/index?id=" + i; } //团购活动
  // else if (t == 'secdkillcoupon' || t == 'secdkillproduct') { n = "/pages/productdetail/index?id=" + i + "&fromType=kill"; }
  // else if ("coupon" === t) n = "/pages/coupons/index?id=" + (i = i.replace("?", "&")); //优惠券

  wx.navigateTo({
    url: n
  })
}, module.exports = e;